home *** CD-ROM | disk | FTP | other *** search
/ Dragon Blade - Wrath of Fire (USA) (Press Kit) / Dragon Blade - Wrath of Fire (USA) (Press Kit).bin / pc / main.swf / scripts / frame_55 / DoAction.as
Encoding:
Text File  |  2007-01-01  |  3.3 KB  |  82 lines

  1. function loadImage(iName)
  2. {
  3.    imageLoader.loadClip(content_xml.firstChild.childNodes[2].childNodes[2].childNodes[iName].attributes.preview,loadIntoMe_mc);
  4. }
  5. function brandEnabler(loaderName)
  6. {
  7.    navL_mc.buttons_mc[loaderName].hitVal = 1;
  8.    navL_mc.buttons_mc[loaderName].hit_mc.enabled = false;
  9.    btnInfob_mc.hit2_mc.tween("_y",0,0.3,"easeOutQuad");
  10.    btnInfob_mc.name_txt.tween("_y",9,0.3,"easeOutQuad");
  11.    navL_mc.buttons_mc[prevName].hit_mc.enabled = true;
  12.    navL_mc.buttons_mc[prevName].hit_mc.colorTo(0,0.3,"easeOutSine");
  13.    navL_mc.buttons_mc[prevName].name_txt.colorTo(16770048,0.3,"easeOutSine");
  14.    navL_mc.buttons_mc[prevName].arrow_txt.colorTo(16777215,0.3,"easeOutSine");
  15.    navL_mc.buttons_mc[prevName].loadBar_mc.tween("_width",0,0.3,"easeInSine");
  16.    prevName = loaderName;
  17. }
  18. stop();
  19. secCount_var = 2;
  20. headingSub_txt.text = "LOGOS";
  21. var Bspacing = 1;
  22. b = 0;
  23. while(b < imageTotal)
  24. {
  25.    imageTotal = content_xml.firstChild.childNodes[2].childNodes[2].childNodes.length;
  26.    btnPreview = content_xml.firstChild.childNodes[2].childNodes[2].childNodes[b].attributes.preview;
  27.    btnHiRes = content_xml.firstChild.childNodes[2].childNodes[2].childNodes[b].attributes.hiRes;
  28.    btnName = content_xml.firstChild.childNodes[2].childNodes[2].childNodes[b].firstChild.nodeValue;
  29.    if(b == 0)
  30.    {
  31.       var butName = "button" + b + "_mc";
  32.       navL_mc.buttons_mc.attachMovie("button",butName,b);
  33.       navL_mc.buttons_mc[butName]._alpha = 0;
  34.       navL_mc.buttons_mc[butName].alphaTo(100,0.3,"easeOutSine");
  35.       navL_mc.buttons_mc[butName].name_txt.html = true;
  36.       navL_mc.buttons_mc[butName].name_txt.autoSize = "left";
  37.       navL_mc.buttons_mc[butName].name_txt.wordWrap = true;
  38.       navL_mc.buttons_mc[butName].name_txt.htmlText = btnName;
  39.       navL_mc.buttons_mc[butName].HRLink = btnHiRes;
  40.       navL_mc.buttons_mc[butName].PLink = btnPreview;
  41.       navL_mc.buttons_mc[butName].PNum = b;
  42.    }
  43.    else
  44.    {
  45.       var butName = "button" + b + "_mc";
  46.       navL_mc.buttons_mc.attachMovie("button",butName,b);
  47.       navL_mc.buttons_mc[butName]._alpha = 0;
  48.       navL_mc.buttons_mc[butName].alphaTo(100,0.3,"easeOutSine");
  49.       var buttonsHeight = Math.round(navL_mc.buttons_mc._height);
  50.       var y = Bspacing;
  51.       navL_mc.buttons_mc[butName].name_txt.autoSize = "left";
  52.       navL_mc.buttons_mc[butName].name_txt.wordWrap = true;
  53.       navL_mc.buttons_mc[butName].name_txt.html = true;
  54.       navL_mc.buttons_mc[butName].name_txt.htmlText = btnName;
  55.       navL_mc.buttons_mc[butName]._y = y + buttonsHeight;
  56.       navL_mc.buttons_mc[butName].HRLink = btnHiRes;
  57.       navL_mc.buttons_mc[butName].PLink = btnPreview;
  58.       navL_mc.buttons_mc[butName].PNum = b;
  59.    }
  60.    if(b == imageTotal - 1)
  61.    {
  62.       if(navL_mc.buttons_mc._height > 300)
  63.       {
  64.          navL_mc.gotoAndStop(2);
  65.       }
  66.    }
  67.    b++;
  68. }
  69. var imageLoader = new MovieClipLoader();
  70. var loadHandler = new Object();
  71. imageLoader.addListener(loadHandler);
  72. loadHandler.onLoadInit = function(loadIntoMe_mc)
  73. {
  74.    loadIntoMe_mc.colorTo(null,0.3,"easeOutQuad",0.3);
  75.    navL_mc.buttons_mc[prevName].loadBar_mc.tween("_width",0,0.3,"easeInSine",1);
  76. };
  77. loadHandler.onLoadProgress = function(loadIntoMe_mc, loaded, total)
  78. {
  79.    percent_loaded = Math.round(loaded / total * 188);
  80.    navL_mc.buttons_mc[prevName].loadBar_mc._width = percent_loaded;
  81. };
  82.